//
// Created by Administrator on 2019/12/10.
//
#include "Fruit.h"


Fruit::Fruit(const string &n) {
    name = n;
}

string Fruit::getName() {
    return name;
}

Fruit::Fruit(const Fruit &f) {
    name = f.name;
}

Fruit Fruit::operator+(const Fruit &other) {
    Fruit f("");
    f.name.append(this->name).append(other.name);
    return f;
}

void Fruit::eat() {
    cout<<"call Fruit eat"<<endl;
}

